package com.example.demo.controller;

import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class HomeController {
	//日志logger
	private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@RequestMapping({"/","index"})
	public String home(Model model) {
		model.addAttribute("mymessage",new Date());
		logger.info("----主控制器");
		return "index";
	}
	
	@RequestMapping("/deposit")
	public String deposit(Model model) {
		model.addAttribute("mymessage",new Date());
		logger.info("----主控制器");
		return "deposit";
	}
}
